﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace WCS.Infrastructure.EFCore;

/// <summary>
/// 错误日志表
/// </summary>
[Table("ErrorLog")]
public partial class ErrorLog
{
    /// <summary>
    /// 错误日志ID
    /// </summary>
    [Key]
    [StringLength(32)]
    public string Id { get; set; } = null!;

    /// <summary>
    /// 用户ID
    /// </summary>
    [StringLength(32)]
    public string? UserId { get; set; }

    /// <summary>
    /// 错误消息
    /// </summary>
    public string? Message { get; set; }

    /// <summary>
    /// 引发错误的接口地址
    /// </summary>
    [StringLength(255)]
    public string? Api { get; set; }

    /// <summary>
    /// 请求IP
    /// </summary>
    [Column("IP")]
    [StringLength(20)]
    public string? Ip { get; set; }

    /// <summary>
    /// 本次请求的参数
    /// </summary>
    public string? Params { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Column(TypeName = "timestamp(6) without time zone")]
    public DateTime? CreationTime { get; set; }
}
